package com.xxq.semester.entity.question;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Map;

import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author saki
 * @since 2025-07-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("questions")
public class Questions implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "question_id", type = IdType.AUTO)
    private Integer questionId;

    @TableField("creator_id")
    private Integer creatorId;

    @TableField("content")
    private String content;

    @TableField(value = "options", typeHandler = JacksonTypeHandler.class)
    private Map<String, String> options;

    @TableField("answer")
    private String answer;

    @TableField("difficulty")
    private String difficulty;

    @TableField("created_at")
    private LocalDateTime createdAt;

    @TableField("type")
    private Integer type;


}
